﻿

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;


public class BLL_tbl_client_details
{
    public BLL_tbl_client_details()
    {

    }

    public List<tbl_client_details> select(String USER_CODE)
    {
        DAL_tbl_client_details dal = new DAL_tbl_client_details();
        return dal.select(USER_CODE);
    }

    public List<tbl_client_details> selectAll()
    {
        DAL_tbl_client_details dal = new DAL_tbl_client_details();
        return dal.selectAll();
    }

    public bool insert(tbl_client_details tbl)
    {
        DAL_tbl_client_details dal = new DAL_tbl_client_details();
        int i = 0;
        i = dal.insert(
            tbl.USER_CODE
, tbl.COMPANY_NAME
, tbl.COMPANY_ADDRESS
, tbl.Country
, tbl.STATE
, tbl.CITY
, tbl.POSTAL_CODE
, tbl.PRIMARY_TELEPHONE
, tbl.SECONDARY_TELEPHONE
, tbl.PRIMARY_MOBILE
, tbl.SECONDARY_MOBILE
, tbl.Email
, tbl.Agreement_Document
, tbl.Agreement_Document_GUID
, tbl.Link_To_ISF
, tbl.Link_To_ISF_GUID
, tbl.FAX
, tbl.LinkedIn_ID
, tbl.Skype_ID
, tbl.VAT_Tax_ID
, tbl.CREATED_BY
, tbl.CREATED_DATE
, tbl.Active
        );

        return Convert.ToBoolean(i);
    }


    public bool update(tbl_client_details tbl)
    {
        DAL_tbl_client_details dal = new DAL_tbl_client_details();
        int i = 0;
        i = dal.update(
            tbl.USER_CODE
, tbl.COMPANY_NAME
, tbl.COMPANY_ADDRESS
, tbl.Country
, tbl.STATE
, tbl.CITY
, tbl.POSTAL_CODE
, tbl.PRIMARY_TELEPHONE
, tbl.SECONDARY_TELEPHONE
, tbl.PRIMARY_MOBILE
, tbl.SECONDARY_MOBILE
, tbl.Email
, tbl.Agreement_Document
, tbl.Agreement_Document_GUID
, tbl.Link_To_ISF
, tbl.Link_To_ISF_GUID
, tbl.FAX
, tbl.LinkedIn_ID
, tbl.Skype_ID
, tbl.VAT_Tax_ID
, tbl.UPDATED_BY
, tbl.UPDATED_DATE
, tbl.Active
            );

        return Convert.ToBoolean(i);
    }


    public bool delete(tbl_client_details tbl)
    {
        DAL_tbl_client_details dal = new DAL_tbl_client_details();
        int i = 0;
        i = dal.delete(
                tbl.USER_CODE
        );

        return Convert.ToBoolean(i);
    }


}

